<template>
  <div>
    <el-dialog :visible.sync="visible">
      <el-container>
        <el-header>
          <el-col :span="24">
            <div class="tite">
              <div style="width: 100%; text-align: center">
                <div>
                  <span class="titename">密码登录</span>
                </div>
              </div>
            </div>
          </el-col>
        </el-header>

        <el-main>
          <div class="tite marlef with bor">
            <div class="account">账号</div>
            <div class="numbers">
              <input placeholder="请输入账号" type="text" />
            </div>
          </div>
          <div class="tite marlef with bors">
            <div class="account">密码</div>
            <div class="numberst tite">
              <input type="password" id="ipt" placeholder="请输入密码" />
              <div @click="displays()">
                <div v-if="dis == false">
                  <img src="../assets/闭眼睛.png" alt="" />
                </div>
                <div v-if="dis == true">
                  <img src="../assets/闭眼睛 (1).png" alt="" />
                </div>
              </div>

              <div class="Codes">忘记密码?</div>
            </div>
          </div>
          <div class="m-2">
            <el-row>
              <el-button class="buttons" @click="reg()">注册</el-button>
              <el-button class="buttons" @click="login()" type="primary">登录</el-button>
            </el-row>
          </div>
        </el-main>
      </el-container>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      visible: false,
      input: "",
      dis: false,
    };
  },
  methods: {
    open() {
      this.visible = true;
    },
    displays() {
      let ipt = document.getElementById("ipt");
      if (this.dis == false) {
        ipt.type = "text";
        this.dis = true;
      } else {
        ipt.type = "password";
        this.dis = false;
      }
    },
    reg() {
      alert("点击了注册");
    },
    login() {
      alert("点击了登录");
    },
  },
};
</script>

<style scoped>
.buttons {
  width: 35%;
  height: 45px;
  margin: 10px;
  border-radius: 5px;
}
.m-2 {
  margin: 10px;
  text-align: center;
}
.tite {
  display: flex;
}
.titename {
  font-size: 25px;
  margin: 10px;
  color: rgb(21, 159, 223);
}
.account {
  width: 10%;
  height: 50px;
  text-align: center;
  line-height: 50px;
  font-size: 25px;
  margin: 5px;
  margin-left: 10px;
}
.numbers {
  width: 85%;
  height: 50px;
  padding: 10px;
  padding-bottom: 0px;
}
.numberst {
  width: 85%;
  height: 50px;
  padding: 10px;
  padding-bottom: 0px;
}
.marlef {
  margin-left: 15%;
}
input {
  width: 100%;
  height: 80%;
  border: none;
  outline: none;
  font-size: 20px;
}
.bor {
  border: 1px solid #ccc;
}
.bors {
  border: 1px solid #ccc;
  border-top: none;
}
.with {
  width: 70%;
}
.Codes {
  width: 30%;
  height: 50px;
  padding: 10px;
  padding-bottom: 0px;
  font-size: 15px;
  color: rgb(21, 159, 223);
}
img {
  width: 20px;
  height: 20px;
  padding: 10px;
  padding-bottom: 0px;
  font-size: 15px;
}
input::-ms-reveal {
  display: none;
}
input::-ms-clear {
  display: none;
}
/*edge*/
input::-o-clear {
  display: none;
}
</style>
